#!/bin/sh

for i in TB_AD_Playlist  TB_AD_Playlist_fromSrv TB_AD_PlaylistM1 TB_AD_PlaylistM1_fromSrv TB_KTVNetRoom_statistics TB_ClickRecord TB_ClickRecordNew TB_KTVNetRoomConsumeRecord TB_AD_BillDetails common_ad TB_DM_DataSyncTrack TB_DM_DistributionTrack TB_AlreadyClick TB_BateLog TB_LackSong TB_KTVNetRoomCheckInOut
do
  mysql BX_VOD -e "delete from $i;"
  [ $? -eq 0 ]&&echo -e "\e[1;32m 数据库-表${i}初始完成！！！\e[0m"||echo -e "\e[1;31m 数据库-表${i}初始失败！！！\e[0m"
done

for i in node_cloud_download node_crash node_material node_profile node_record node_room_device node_room_session node_room_song_list
do
    mysql bestarmedia_node -e "truncate table $i;"
    [ $? -eq 0 ]&&echo -e "\e[1;32m 数据库-表${i}初始完成！！！\e[0m"||echo -e "\e[1;31m 数据库-表${i}初始失败！！！\e[0m"
done
mysql -udev -pdev2018918 -h127.0.0.1 bestarmedia_node -e'UPDATE node_room SET current_session="''", status=0, is_enabled=0, vod_token="''";'
